Platform Explorer / Nuxeo Platform 2021.56

Component org.nuxeo.elasticsearch.core.bulk.contrib

Requirements

Resolution Order

842
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.elasticsearch.core.bulk.contrib" version="1.0.0">

  <require>org.nuxeo.ecm.core.bulk.config</require>

  <extension target="org.nuxeo.ecm.core.bulk" point="actions">
    <action name="index" inputStream="bulk/index" bucketSize="1000" batchSize="25"
      enabled="${elasticsearch.enabled:=true}" />
  </extension>

  <extension target="org.nuxeo.runtime.stream.service" point="streamProcessor">
    <streamProcessor name="indexAction" class="org.nuxeo.elasticsearch.bulk.IndexAction"
      defaultConcurrency="2" defaultPartitions="4" enabled="${elasticsearch.enabled:=true}">
      <policy name="default" maxRetries="20" delay="1s" maxDelay="60s" continueOnFailure="false" />
      <!-- fetch content and build indexing requests -->
      <computation name="bulk/index" concurrency="${nuxeo.bulk.action.reindex.index.concurrency:=2}" />
      <stream name="bulk/index" partitions="${nuxeo.bulk.action.reindex.index.partitions:=4}" />
      <!-- submit requests to elastic -->
      <computation name="bulk/bulkIndex" concurrency="${nuxeo.bulk.action.reindex.bulkIndex.concurrency:=2}" />
      <stream name="bulk/bulkIndex" partitions="${nuxeo.bulk.action.reindex.bulkIndex.partitions:=4}">
        <filter name="overflow" class="org.nuxeo.ecm.core.transientstore.computation.TransientStoreOverflowRecordFilter">
          <option name="storeName">default</option>
          <option name="prefix">index</option>
          <option name="thresholdSize">990000</option>
        </filter>
      </stream>
      <computation name="bulk/indexCompletion" concurrency="1" />
      <!-- optimal size of the elasticsearch bulk request -->
      <option name="esBulkSizeBytes">5242880</option>
      <!-- max number of actions in the elasticsearch bulk request -->
      <option name="esBulkActions">1000</option>
      <!-- flush elasticsearch bulk request interval -->
      <option name="flushIntervalSeconds">5</option>
    </streamProcessor>

  </extension>

</component>